package com.scetop.banking;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Customer {
    private String firstName;

    private String lastName;

    private List<Account> accounts;
    private Account account;


    public Customer(String f, String l){
        this.firstName = f;
        this.lastName = l;

        accounts = new ArrayList<>();
    }
    public void setAccount(Account account){
        this.account = account;
    }
    public void addAccount(Account account){
        accounts.add(account);
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public Account getAccount(int index) {
        return accounts.get(index);
    }

    public int getNumberOfAccounts() {
        return accounts.size();
    }
    public Iterator<Account> getAccount(){
        return accounts.iterator();
    }
}


